package com.ctms.system.service.impl;

import com.ctms.system.dao.StudentMapper;
import com.ctms.system.domain.*;
import com.ctms.system.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    StudentMapper studentMapper;

    @Override
    public List<UserDO> selectAllStudent(Map<String, Object> params) {
        return studentMapper.selectAllStudent(params);
    }

    @Override
    public int count(Map<String, Object> params) {
        return studentMapper.count(params);
    }

    @Override
    public String getClassNameById(Integer id) {
        return studentMapper.getClassNameById(id);
    }

    @Override
    public String getCourseNameById(Integer id) {
        return studentMapper.getCourseNameById(id);
    }

    @Override
    public int getClassIdByName(String className) {
        return studentMapper.getClassIdByName(className);
    }

    @Override
    public int insertStudent(UserDO userDO) {
        return studentMapper.insertStudent(userDO);
    }

    @Override
    public int selectMaxIdByTime() {
        return studentMapper.selectMaxIdByTime();
    }

    @Override
    public int insertClassStudent(ClassStudentDO classStudentDO) {
        return studentMapper.insertClassStudent(classStudentDO);
    }

    @Override
    public int insertCourseStudent(CourseStudentDO courseStudentDO) {
        return studentMapper.insertCourseStudent(courseStudentDO);
    }

    @Override
    public UserDO selectById(Integer userId) {
        return studentMapper.selectById(userId);
    }

    @Override
    public int updateStudent(UserDO userDO) {
        return studentMapper.updateStudent(userDO);
    }

    @Override
    public int deleteClassStudent(Integer userId) {
        return studentMapper.deleteClassStudent(userId);
    }

    @Override
    public int updateClassStudent(ClassStudentDO classStudentDO) {
        return studentMapper.updateClassStudent(classStudentDO);
    }

    @Override
    public int deleteStudent(Integer userId) {
        return studentMapper.deleteStudent(userId);
    }

    @Override
    public List<ClassDO> getAllClass() {
        return studentMapper.getAllClass();
    }

    @Override
    public List<CourseDO> getAllCourse() {
        return studentMapper.getAllCourse();
    }

    @Override
    public List<UserDO> getAllStudent() {
        return studentMapper.getAllStudent();
    }

    @Override
    public List<UserDO> getStudentByClass(String studentClass) {
        return studentMapper.getStudentByClass(studentClass);
    }

    @Override
    public List<String> selectAllMonitor() {
        return studentMapper.selectAllMonitor();
    }
}
